POV-Ray : Newsgroups : povray.general : Doc bug - substr() : Re: Doc bug - substr() Server Time
8 Aug 2024 06:18:57 EDT (-0400)
  Re: Doc bug - substr()  
From: Warp
Date: 22 Feb 2001 05:23:01
Message: <3a94e885@news.povray.org>
It seems that the one who wrote that part of the doc thought that the
indexing starts from 0 and ends at strlen(S)-1, as in C.

  Perhaps the problem is not in the documentation, but in povray. In my
opinion this behaviour is a bit inconsistent. Array indexing starts from 0.

-- 
char*i="b[7FK@`3NB6>B:b3O6>:B:b3O6><`3:;8:6f733:>::b?7B>:>^B>C73;S1";
main(_,c,m){for(m=32;c=*i++-49;c&m?puts(""):m)for(_=(
c/4)&7;putchar(m),_--?m:(_=(1<<(c&3))-1,(m^=3)&3););}    /*- Warp -*/


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.